#ifndef _BENCHMARK_H_
#define _BENCHMARK_H_

#include <GL/gl.h>
#include <time.h>
//#include <stdio.h>

#include <iostream>

class CBenchmark
{
	uint32 start_time;
	uint32 end_time;

public:
	CBenchmark() 
	{ 
		start_time = 0; 
		end_time = 0; 
	}
	~CBenchmark() {}

	void Start(const char * pStr)
	{
#ifdef USE_BENCHMARK
		std::cout << "Benchmark " << pStr << " started;" << std::endl;
#endif

		start_time = clock();
	}

	uint32 End(void)
	{
		end_time = clock();

#ifdef USE_BENCHMARK
		std::cout << "Benchmark time " << end_time - start_time << std::endl;
#endif

		return end_time-start_time;
	}

	void Print()
	{
		//std::cout << "Benchmark time " << end_time - start_time << std::endl;
	}
};

#endif // _BENCHMARK_H_